<html><head>
        <link href="<?php echo base_url('assets/css/formkk.css'); ?>" rel="stylesheet" type="text/css">
        <title>Laporan Data KK</title>
    </head>
    <body>
        <table width="100%" border="0" align="center">
            <tr>
                <td colspan="10" class="trheader">Laporan Data Kartu Keluarga</td>
            </tr>
            <tr>
                <td colspan="10" class="jeda">&nbsp;</td>
            </tr>
            <tr>
                <td width="3%" bordercolor="#666666"><div align="center"><strong>No</strong></div></td>
                <td width="16%" bordercolor="#666666"><div align="center"><strong>Nomor KK</strong></div></td>
              <td width="15%" bordercolor="#666666"><div align="center"><strong>NIK Kepala Keluarga</strong></div></td>
              <td width="18%" bordercolor="#666666"><div align="center"><strong>Nama Kepala Keluarga</strong></div></td>
              <td width="22%" bordercolor="#666666"><div align="center"><strong>Alamat</strong></div></td>
              <td width="10%" bordercolor="#666666"><div align="center"><strong>Tgl. Pembuatan</strong></div></td>
              <td width="16%" colspan="2" bordercolor="#666666"><div align="center"><strong>Atur<br>Ubah - Hapus</strong></div></td>
          </tr>

            <?php
            if (isset($kk)) {
                $no = 1;
                foreach ($kk->result() as $data_kk) {
                    echo '<tr>';
                    echo '<td><div align="center">' . $no++ . '</div></td>';
                    echo '<td><div align="center">' . $data_kk->no_kk . '</div></td>';
                    echo '<td><div align="center">' . $data_kk->nik_kk . '</div></td>';
                    echo '<td>' . $data_kk->nama_kk . '</td>';
                    echo '<td>' . $data_kk->alamat . ' RT ' . $data_kk->rt . ', RW ' . $data_kk->rw . ', Dusun ' . $data_kk->dusun . '</td>';
                    echo '<td><div align="center">' . $this->tanggal->tanggal_indonesia($data_kk->tgl_pembuatan) . '</div></td>';
                    echo '<td><div align="center"><a href="' . base_url('kk/ubah/' . $data_kk->no_kk) . '"><img src="' . base_url('assets/images/ubah.png') . '"></a>  -  '
                    . '<a href="' . base_url('kk/hapus/' . $data_kk->no_kk) . '"><img src="' . base_url('assets/images/hapus.png') . '"></a></div></td>';
                    echo '</tr>';
                }
            }
            ?>
        </table>
        <br>
        <table width="419" border="0" align="center">
            <tr>
                <td colspan="2" class="jeda"><strong>Data Tercatat</strong></td>
            </tr>
            <tr>
                <td width="177">Jumlah Kepala Keluarga</td>
                <td width="232">: <?php echo $kk->num_rows(); ?> kepala keluarga</td>
            </tr>
        </table>
    </body>
</html>
